package com;

import com.service.MessageService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan({"com.config","com.service"})
@SpringBootApplication
public class ApplicationRabbitmq {

    public static void main(String[] args) {
        ApplicationContext applicationContext =  SpringApplication.run(ApplicationRabbitmq.class);
        MessageService messageService = applicationContext.getBean(MessageService.class);
        messageService.sendMessage();
    }
}
